package cn.tanghom.app.oa.repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import cn.tanghom.app.oa.model.Talent;

@Repository
public interface TalentRepository extends MongoRepository<Talent, Long> {

    Talent findById(Long id);
    
    List<Talent> findByName(String name); 
    
    Page<Talent> queryFirst10ByName(String name, Pageable pageable);
    
    Page<Talent> queryFirst20ByJobTitle(String jobtitle, Pageable pageable);
    
    Page<Talent> findByStatus(int status, Pageable pageable);
    
    //根据等级返回
    Page<Talent> findByLevel(int level, Pageable pageable);
}